//
//  NSThread+QTZ.m
//  QTZ
//
//  Created by ski on 2017/7/5.
//  Copyright © 2017年 ski. All rights reserved.
//

#import "NSThread+QTZ.h"

@implementation NSThread (QTZ)

- (void)performBlock:(void (^)(void))block {
    [self performSelector:@selector(onlyForRunBlock:) onThread:self withObject:block waitUntilDone:NO];
}

- (void)performBlock:(void (^)(void))block afterDelay:(NSTimeInterval)delay {
    [self performBlock:^{
        [self performSelector:@selector(onlyForRunBlock:) withObject:block afterDelay:delay];
    }];
}

- (void)onlyForRunBlock:(void(^)(void))block {
    block();
}

@end
